/**
 * Created by LaoXu on 2017/12/20.
 * @description:商品信息
 */
const pool = require('./base/pool');

class Food {
    constructor() {

    }

    /**
     * 根据店铺的ID获取商品信息
     * @param params
     * @param callback
     */
    getDataList(params, callback) {
        var {shop_id} = params,
            sql = 'SELECT * FROM t_food ';

        if (shop_id) {
            sql += ' WHERE shop_id = ' + shop_id
        }
        pool.querySQL(sql, function (results) {
            if (callback) {
                callback(results);
            }
        });
    }
}

module.exports = Food;
